package com.happy.cat.project.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.happy.cat.project.system.domain.UserGiftDetail;
import com.happy.cat.project.system.mapper.UserGiftDetailMapper;
import com.happy.cat.project.system.service.IUserGiftDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * 用户赠送礼物日志Service业务层处理
 *
 * @author verne
 * @date 2020-08-15
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UserGiftDetailServiceImpl extends ServiceImpl<UserGiftDetailMapper, UserGiftDetail> implements IUserGiftDetailService {

    @Autowired
    private UserGiftDetailMapper userGiftDetailMapper;

    @Override
    public List<Map<String, Object>> groupByGiftToReceiverId(Long receiverId) {
        return userGiftDetailMapper.groupByGiftToReceiverId(receiverId);
    }
}
